package com.beta.mq.redis.consumer;

import com.beta.mq.redis.model.Message;

import java.util.List;

/**
 * @author taofucheng
 * @date 2015/12/8.
 */
public interface Consumer {

    Message getMessage(String topic) throws InterruptedException;

    List<Message> getBatchMessage(String topic, Integer limit) throws InterruptedException;

    void retry(String topic, Message message) throws InterruptedException;

    public void retryBatch(String topic, List<Message> messages) throws InterruptedException;
}
